﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Valentia.Kinection.DataTypes
{
    #region NotificationType Enum
    /// <summary>
    /// Notification type enum.
    /// </summary>    
    public enum NotificationType : int
    {
        /// <summary>
        /// Exception.
        /// </summary>
        Exception,

        /// <summary>
        /// Data extractor is started.
        /// </summary>
        DataExtractorStarted,

        /// <summary>
        /// Data extractor is stopped.
        /// </summary>
        DataExtractorStopped,

        /// <summary>
        /// Kinect device is alread in use by other applicaion.
        /// </summary>
        Kinect_Already_In_Use,

        /// <summary>
        /// Kinect device is initilized by appliction and data extraction is started.
        /// </summary>
        KinectLocked,

        /// <summary>
        /// Kinect device is uninitilized by appliction and data extraction is stopped.
        /// </summary>
        KinectReleased,

        /// <summary>
        /// Kinect device status is changed.
        /// </summary>
        KinectStatusChanged,

        /// <summary>
        /// Skeleton is tracked by the kinect device.
        /// </summary>
        SkeletonTracked,

        /// <summary>
        /// Skeleton is relesead by the kinect device.
        /// </summary>
        SkeletonReleased
    }
    #endregion

    #region KinectRuntimeOptions Enum
    /// <summary>
    /// Kinect run time options enum.
    /// </summary>
    [Flags]
    public enum KinectRuntimeOptions : int
    {
        /// <summary>
        /// UseDepthAndPlayerIndex.
        /// </summary>
        UseDepthAndPlayerIndex = 1,

        /// <summary>
        /// UseColor.
        /// </summary>
        UseColor = 2,

        /// <summary>
        /// UseSkeletalTracking.
        /// </summary>
        UseSkeletalTracking = 8,

        /// <summary>
        /// UseDepth.
        /// </summary>
        UseDepth = 32,
    }
    #endregion

    #region KinectImageResolution Enum
    /// <summary>
    /// Kinect image resolution enum.
    /// </summary>
    public enum KinectImageResolution : int
    {
        /// <summary>
        /// Invalid resoloution.
        /// </summary>
        Invalid = -1,

        /// <summary>
        /// 80x60 resolution.
        /// </summary>
        Resolution80x60 = 0,

        /// <summary>
        /// 320x240 resolution.
        /// </summary>
        Resolution320x240 = 1,

        /// <summary>
        /// 640x480 resolution.
        /// </summary>
        Resolution640x480 = 2,

        /// <summary>
        /// 1280x1024 resolution.
        /// </summary>
        Resolution1280x1024 = 3,
    }
    #endregion

    #region KinectImageResolution Enum
    /// <summary>
    /// Kinect image type enum.
    /// </summary>
    public enum KinectImageType : int
    {
        /// <summary>
        /// DepthAndPlayerIndex.
        /// </summary>
        DepthAndPlayerIndex = 0,

        /// <summary>
        /// Color.
        /// </summary>
        Color = 1,

        /// <summary>
        /// ColorYuv.
        /// </summary>
        ColorYuv = 2,

        /// <summary>
        /// ColorYuvRaw.
        /// </summary>
        ColorYuvRaw = 3,

        /// <summary>
        /// Depth.
        /// </summary>
        Depth = 4
    }
    #endregion

    #region KinectSkeletonQuality Enum
    /// <summary>
    /// Kinect skeleton quality enum.
    /// </summary>
    [Flags]
    public enum KinectSkeletonQuality
    {
        /// <summary>
        /// ClippedRight.
        /// </summary>
        ClippedRight = 1,

        /// <summary>
        /// ClippedLeft.
        /// </summary>
        ClippedLeft = 2,

        /// <summary>
        /// ClippedTop.
        /// </summary>
        ClippedTop = 4,

        /// <summary>
        /// ClippedBottom.
        /// </summary>
        ClippedBottom = 8,
    }
    #endregion

    #region SkeletonJointID Enum
    /// <summary>
    /// Skeleton joint ID enum.
    /// </summary>
    public enum SkeletonJointID : int
    {
        /// <summary>
        /// HipCenter
        /// </summary>
        HipCenter = 0,

        /// <summary>
        /// Spine
        /// </summary>
        Spine = 1,

        /// <summary>
        /// ShoulderCenter
        /// </summary>
        ShoulderCenter = 2,

        /// <summary>
        /// Head
        /// </summary>
        Head = 3,

        /// <summary>
        /// ShoulderLeft
        /// </summary>
        ShoulderLeft = 4,

        /// <summary>
        /// ElbowLeft
        /// </summary>
        ElbowLeft = 5,

        /// <summary>
        /// WristLeft
        /// </summary>
        WristLeft = 6,

        /// <summary>
        /// HandLeft
        /// </summary>
        HandLeft = 7,

        /// <summary>
        /// ShoulderRight
        /// </summary>
        ShoulderRight = 8,

        /// <summary>
        /// ElbowRight
        /// </summary>
        ElbowRight = 9,

        /// <summary>
        /// WristRight
        /// </summary>
        WristRight = 10,

        /// <summary>
        /// HandRight
        /// </summary>
        HandRight = 11,

        /// <summary>
        /// HipLeft
        /// </summary>
        HipLeft = 12,

        /// <summary>
        /// KneeLeft
        /// </summary>
        KneeLeft = 13,

        /// <summary>
        /// AnkleLeft
        /// </summary>
        AnkleLeft = 14,

        /// <summary>
        /// FootLeft
        /// </summary>
        FootLeft = 15,

        /// <summary>
        /// HipRight
        /// </summary>
        HipRight = 16,

        /// <summary>
        /// KneeRight
        /// </summary>
        KneeRight = 17,

        /// <summary>
        /// AnkleRight
        /// </summary>
        AnkleRight = 18,

        /// <summary>
        /// FootRight
        /// </summary>
        FootRight = 19,

        /// <summary>
        /// Count
        /// </summary>
        Count = 20,
    }
    #endregion

    #region KinectDeviceStatus Enum
    /// <summary>
    /// Kinect device status enum.
    /// </summary>
    [Flags]
    public enum KinectDeviceStatus : uint
    {
        /// <summary>
        /// Connected.
        /// </summary>
        Connected = 0,

        /// <summary>
        /// Error
        /// </summary>
        Error = 2147483648,

        /// <summary>
        /// Disconnected
        /// </summary>
        Disconnected = 2197880852,

        /// <summary>
        /// NotReady
        /// </summary>
        NotReady = 2197880853,

        /// <summary>
        /// NotPowered
        /// </summary>
        NotPowered = 2197881471,

        /// <summary>
        /// Not active.
        /// </summary>
        NotActive
    }
    #endregion

    #region ServiceClientType Enum
    /// <summary>
    /// Client types which connects with server
    /// </summary>
    public enum ServiceClientType : int
    {
        /// <summary>
        /// RTC Server
        /// </summary>
        RTCServer = 1,

        /// <summary>
        /// Web Client via web socket
        /// </summary>
        WebClient = 2
    }
    #endregion

    #region Connectivity Status Enum

    /// <summary>
    /// Connectivity status of device and service client
    /// </summary>
    public enum ConnectivityStatus : int
    {
        /// <summary>
        /// Only service client is connected
        /// </summary>
        OnlyServiceClientConnected = 1,

        /// <summary>
        /// Only kinect device is connected
        /// </summary>
        OnlyDeviceConnected = 2,

        /// <summary>
        /// Service client and kinect device both are connected
        /// </summary>
        BothConnected = 3,

        /// <summary>
        /// Service client and kinect device both are disconnected
        /// </summary>
        BothDisconnected = 4
    }

    #endregion

    #region Remoting Client Commands Enum

    /// <summary>
    /// Connectivity status of device and service client
    /// </summary>
    public enum ClientCommands : int
    {
        /// <summary>
        /// Client connected
        /// </summary>
        ClientConnected = 1,

        /// <summary>
        /// Send list of connected kinect devices
        /// </summary>
        SendDevicesConnectivity = 2,

        /// <summary>
        /// Send list of connected service clients
        /// </summary>
        SendClientsConnectivity = 3,

        /// <summary>
        /// Send connectivity status and count of clients
        /// </summary>
        SendConnectivityStatus = 4,

        /// <summary>
        /// Move kinect device upwards
        /// </summary>
        MoveDeviceUp = 5,

        /// <summary>
        /// Move kinect device downwards
        /// </summary>
        MoveDeviceDown = 6,
    }

    #endregion
}
